﻿using DirectSell.IBLL;
using DirectSell.Model.User;
using Microsoft.Practices.Unity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;

namespace DirectSell.WebLayer.Areas.UserAPI
{
    /// <summary>
    /// 用户请求API
    /// </summary>
    public class UserAPIController : ApiController
    {
        [Dependency("UserLogin")]
        protected IOperation _login { get; set; }

        [HttpPost]
        [Route("userapi/login")]
        public async Task<UserRespCode> Login(UserLoginInfo info)
        {
            return await _login.DoOperationAsync(info);
        }
    }
}
